import Vue from 'vue'
import {
  Notification,
  Loading,
  MessageBox,
  PageHeader,
  Dropdown,
  DropdownItem,
  DropdownMenu,
  Menu,
  MenuItem,
  MenuItemGroup,
  Submenu,
  Form,
  FormItem,
  Input,
  Select,
  Option,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioGroup,
  Switch,
  Dialog,
  Image,
  Table,
  TableColumn,
  Breadcrumb,
  BreadcrumbItem,
  Card,
  Button,
  Message,
  Tag,
  Pagination,
  Upload
} from 'element-ui'
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition'

Vue.prototype.$notify = Notification
Vue.prototype.$loading = Loading.service
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$message = Message

export const notify = Notification
export const alert = MessageBox.alert
export const prompt = MessageBox.prompt
export const confirm = MessageBox.confirm
export const message = Message

Vue
  .use(Loading)
  .use(PageHeader)
  .use(Dropdown)
  .use(DropdownItem)
  .use(DropdownMenu)
  .use(Menu)
  .use(MenuItem)
  .use(MenuItemGroup)
  .use(Submenu)
  .use(Form)
  .use(FormItem)
  .use(Input)
  .use(Select)
  .use(Option)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(Radio)
  .use(RadioGroup)
  .use(Switch)
  .use(Dialog)
  .use(Image)
  .use(Table)
  .use(TableColumn)
  .use(Breadcrumb)
  .use(BreadcrumbItem)
  .use(Card)
  .use(Button)
  .use(Tag)
  .use(Pagination)
  .use(Upload)

Vue.component(CollapseTransition.name, CollapseTransition)
